From 2ff6e29af600a0f89cb4420e0892142cac9b4e92 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Wed, 23 Aug 2017 19:34:00 +0200 Subject: [PATCH] xen/arch/x86/mm.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/arch/x86/mm.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/mm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 9a643af61d..1f60d6bd39 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -179,14 +179,20 @@ static uint32_t base_disallow_mask; L1_DISALLOW_MASK : (L1_DISALLOW_MASK & ~PAGE_CACHE_ATTRS)) static s8 __read_mostly opt_mmio_relax; -static void __init parse_mmio_relax(const char *s) + +static int __init parse_mmio_relax(const char *s) { if ( !*s ) opt_mmio_relax = 1; else opt_mmio_relax = parse_bool(s, NULL); if ( opt_mmio_relax < 0 && strcmp(s, "all") ) + { opt_mmio_relax = 0; + return -EINVAL; + } + + return 0; } custom_param("mmio-relax", parse_mmio_relax); -- 2.30.2